//工程模式
function createPerson(name){
    var o=new Object();
    o.name=name;
    o.getName=function(){
        console.log(this.name);
    }
    return o;
}
var person=createPerson('zhangsan')
console.log(person)